lunomods = { }
local path = minetest.get_modpath(minetest.get_current_modname())

if minetest.setting_getbool("log_mods")~= true then
	minetest.setting_set("log_mods", "false")
end


--[[
minetest.item_eat = function(hp_change, replace_with_item)
	return function(itemstack, user, pointed_thing)  -- closure
		if itemstack:take_item() ~= nil then
			local newHP = user:get_hp() + hp_change
			if newHP > 20 then newHP = 20 end
			if newHP < 0 then newHP = 0 end
			minetest.log('action', user:get_player_name().."algo e ganhou "..hp_change.." de HP.")
			minetest.sound_play("obj_chew", {pos=user.pos, max_hear_distance = 5}) --toca som "obj_chew".ogg a distancia de 5 blocos do usuario.
			user:set_hp(newHP)
			itemstack:add_item(replace_with_item) -- note: replace_with_item is optional
		end
		return itemstack
	end
end
]]--

--dofile(path.."/gramado.lua") --Faz crecer gramado sobre terra verde...
dofile(path.."/api.lua")
dofile(path.."/on_variables.lua")
dofile(path.."/on_control_xp.lua")
dofile(path.."/pick_up_dropped_items.lua")

dofile(path.."/on_commands_ajuda.lua")
dofile(path.."/on_commands_alert.lua")
dofile(path.."/on_commands_delete.lua")
dofile(path.."/on_commands_lunomods.lua")
dofile(path.."/on_commands_respawnall.lua")
dofile(path.."/on_commands_teleport.lua")
dofile(path.."/on_commands_what.lua")
dofile(path.."/on_soundchat.lua") --Bugado

--dofile(path.."/open_url.lua")
--lunomods.test_openurl()

minetest.log('action','[LUNOMODS] Carregado!')

